import fetch from '@/api/fetch'

const bigToastProps = {
	duration: 5000,
	className: 'tkon-toast'
}
// 附件删除接口
export function crmFileDelete(data) {
	return fetch({
		url: 'insurance/removeById',
		method: 'post',
		data: data
	})
}

// 附件上传接口
export function crmFileSave(data, query) {
	var param = new FormData()
	Object.keys(data).forEach((key) => {
		param.append(key, data[key])
	})
	console.log(query)
	return fetch({
		url: 'insurance/uploadFile',
		method: 'post',
		data: param,
		params: query || {},
		headers: {
			'Content-Type': 'multipart/form-data'
		}
	})
}
